﻿<!doctype html>
<html><!-- InstanceBegin template="/Templates/template1.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta charset="utf-8">
<!-- InstanceBeginEditable name="doctitle" -->
<title>报名</title>
<!-- InstanceEndEditable -->
<script type="text/javascript" src="../js/common.js"></script>
<link href="../css/Pager.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../js/jquery.pager.js"></script>
<script type="text/javascript" src="../js/gbRst.js"></script>
<script type="text/javascript" src="../js/utils.js"></script>
<script type="text/javascript" src="../js/checkLogin.js"></script>
<link href="../css/style.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../js/shopSelecterNew.js"></script>
<script type="text/javascript" src="../js/pagination.js"></script>
		<script type="text/javascript" src="shadowbox/shadowbox.js"></script>
		<link href="shadowbox/shadowbox.css" rel="stylesheet" />

	<link rel="stylesheet" href="../css/default.css" />
	<script type="text/javascript" src="../js/doubleDate2.0.js"></script> 
<script type="text/javascript">
$(function(){
	
	$('.doubledate').kuiDate({
		className:'doubledate',
		isDisabled: "0"  // isDisabled为可选参数，“0”表示今日之前不可选，“1”标志今日之前可选
	});
	initImage()

});
</script>
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<style type="text/css">
#window_change p label span img{
    border: 1px solid #CCCCCC;
    height: 51px;
    vertical-align: middle;
    width: 75px;

}

</style>

<script type="text/javascript" >
$(function(){
	$("#shopIsChoosed").click(function(){
		if($("#shopIsChoosed").is(":checked")){
			$("#shopName").attr("disabled",false);
			$("#research").attr("disabled",false);
			
		}else{
			$("#shopName").attr("disabled",true);

		}
	});
})
function  downRescouse(){
	var mp=$("#mp").val().replace(/\s/gi,'');	
	var name=$("#name").val().replace(/\s/gi,'');
	var type=$("#type").val();
	var dtBegin=$("#dtBegin").val();
	var dtEnd=$("#dtEnd").val();
	var shopId="";
	if($("#shopIsChoosed").is(":checked")){	
		shopId=$("#shopName").val();
		if(shopId!=""&&shopId!=null){
			
		}else{
			shopId="";
		}
	}
	
	var params = {'mp':mp,'name':name,'type':type,'dtBegin':dtBegin,'dtEnd':dtEnd,'shopId':shopId}
	window.location.href="../apply/export/csv?"+$.param(params);

	}
	




function deleteInfo(id){
	
		$.post("../shop/del/deleteShop",{"id":id}, function(data) {
			var dt = JSON.parse(data);
			if(IsEmpty(dt)){
				art.dialog({fixed:true, lock: true,content:"删除出错",icon:'error',ok:true});	
				return false;
				}
				if(dt.state==0){
					InitTable();
					art.dialog({fixed:true, lock: true,content:"删除成功",icon:'succeed',ok:true});	
				}else if(dt.state==1){
					art.dialog({fixed:true, lock: true,content:dt.msg,icon:'error',ok:true});	
				}else{
					checkStateShowErrorMsgAndDealResult(data);
				}
		});
	
}

	
	
function popPoint(id){
	art.dialog({fixed:true, lock: true,content:"确认删除该条数据？",icon:'question',ok: function(){ deleteInfo(id)},cancel:true});
	}

function search(){
	getTryDriverList(1)
}

function getTryDriverList (index){
	if(IsEmpty(index)){
		index=1
	}
	
	var mp=$("#mp").val().replace(/\s/gi,'');	
	var name=$("#name").val().replace(/\s/gi,'');
	var type=$("#type").val();
	var dtBegin=$("#dtBegin").val();
	var dtEnd=$("#dtEnd").val();
	var shopId="";
	if($("#shopIsChoosed").is(":checked")){	
		shopId=$("#shopName").val();
		if(shopId!=""&&shopId!=null){
			
		}else{
			shopId="";
		}
	}
	
	var params = {'mp':mp,'name':name,'type':type,'dtBegin':dtBegin,'dtEnd':dtEnd,'shopId':shopId}
	var dt = _findInfo("../apply/find/applyList/"+(index - 1)+"/10", params);
	if(IsNotEmpty(dt)&&dt.state==0){
		 $("#memberList tbody").empty()

		for ( var i = 0; i < dt.result.data.length; i++) {
			var htm="<tr>"
			 htm+="<td>"+_getStringOfJson(i, dt, "type")+"</td>"
			 htm+="<td> <img src='"+_getStringOfJson(i, dt, "imageUrl")+"' onclick=\"openImage(\'"+_getStringOfJson(i, dt, "imageUrl")+"\')\" ></td>"
			 htm+="<td>"+_getStringOfJson(i, dt, "name")+"</td>"
			 htm+="<td>"+_getStringOfJson(i, dt, "mp")+"</td>"
			 htm+="<td>"+_getStringOfJson(i, dt, "IDNumber")+"</td>"
			 htm+="<td>"+_getStringOfJson(i, dt, "age")+"</td>"
			 htm+="<td>"+_getStringOfJson(i, dt, "address")+"</td>"
			 htm+="<td>"+_getStringOfJson(i, dt, "Nation")+"</td>"
			 htm+="<td>"+_getStringOfJson(i, dt, "qq")+"</td>"
			 htm+="<td>"+_getStringOfJson(i, dt, "staName")+"</td>"
			 htm+="<td>"+_getStringOfJson(i, dt, "height")+"</td>"
			 htm+="<td>"+_getStringOfJson(i, dt, "weight")+"</td>"
			 htm+="<td>"+_getStringOfJson(i, dt, "love")+"</td>"
			 htm+="<td>"+_getStringOfJson(i, dt, "createdTime")+"</td>"
			
			 htm+="</tr>"
			 $("#memberList tbody").append(htm)
		}
/* 		_loadInfo(dt, "memberList", param)
 */		$("#memberList tbody tr").each(function(){
			
		})
		_loadPage("pager", index, 10, dt, getTryDriverList, "NoResult");
		$("#sup").html("共"+dt.result.len+"条");		
	}
}
function initImage() {
	Shadowbox.init();
	window.openImage = function(url) {
		Shadowbox.open({
			content : url,
			player : 'img'
		});
	};
}
</script>
</head>

<body>

<div class="container" id="container">
  <div class="container_R fr">
	<div class="place">报名</div>
    <div class="member_search">

    <p>
   
   <span>  赛区：</span>
                <select id="type" " ><option value="">所有</option><option value="0">高校</option> <option value="1">大众</option> </select>
              
       <!-- <span> <input type="checkbox" id="shopIsChoosed" style="width:auto;height:auto;border:none;">店面：</span>
        <select id="shopName" onclick="openShopListPanel(this)" disabled="disabled">
        </select> -->
      <span>起始日期：</span>
        <input type="text" readonly class="doubledate ipticon"  id="dtBegin"/>
        <span>截止时间：</span>
        <input type="text" readonly class="doubledate ipticon" id="dtEnd"/>
        </p>
        <p>   <span>姓名：</span>
                <input type="text" id="name" class="absoluteTxt">
        <span>手机：</span>
                 <input type="text" id="mp" class="absoluteTxt">
                 
        <input type="button" value="查询" class="btn" onclick="search()"></p></div>
    
    <table width="100%" class="member_list" cellpadding="0" cellspacing="1" border="0" id="memberList">
    	<caption><strong>报名列表        <span id="sup">共0条</span> </strong>  <a href="javascript:void(0)" onclick="downRescouse();">导出数据</a> </caption>
    	<thead>
    	<tr>
    		<th width="50">赛区</th>
        	<th width="30">照片</th>
        	<th width="50">姓名</th>
        	<th width="50">手机</th>
        	<th width="50">身份证</th>
        	<th width="50">年龄</th>
        	<th width="50">地址</th>
        	<th width="50">民族</th>
        	<th width="48">qq</th>
        	<th width="50">婚姻状况</th>
        	<th width="50">身高(cm)</th>
        	<th width="50">体重(kg)</th>
        	<th width="40">爱好</th>
        	<th width="60">报名时间</th>
        </tr>
        </thead>
        <tbody>
        	
        </tbody>
    </table>
    <div id="NoResult"  class="Nothing" style="text-align:center;display: none;">无符合条件的数据！</div>
    <div id="pager" style="float: right;"></div>
  </div>
  <div class="fc"></div>
</div>
<!-- InstanceEndEditable -->
<script type="text/javascript" src="../js/header.js"></script>
<script type="text/javascript" src="../js/left.js"></script>
<script type="text/javascript" src="../js/footer.js"></script>
<script type="text/javascript">
clearThis("absoluteTxt");
showTab(1,1);
</script>
</body>
<!-- InstanceEnd --></html>
